var bgArr = ["img/bg1.jpg","img/bg2.jpg"];
var rkArr = ["img/rocket.png","img/rocket2.png"];
var bgimg = document.querySelector(".bgimg");
var rocket = document.querySelector(".rocket img");
var jump = document.querySelector(".jump img");
var web = document.querySelector(".web");
var web2 = document.querySelector(".web2");
var qiehuan = true;
jump.addEventListener("click",function(){
        web.style.display = "none";
        web2.style.display = "block";

})
setInterval(function(){
        if(qiehuan){
            bgimg.src = bgArr[1];
            rocket.src = rkArr[1];
            qiehuan = false;
        }else{
            bgimg.src = bgArr[0];
            rocket.src = rkArr[0];
            qiehuan = true;
        }
        // console.log(jump);
        jump.classList.remove('down');
        jump.classList.add("change");
},500)

var web2bg = ["img/indexbg.jpg","img/indexbg2.jpg"]
var bgimg2 = document.querySelector(".bgimg2");
var w2qh= true;
setInterval(function(){
        if(qiehuan){
            bgimg2.src = web2bg[1];
            w2qh = false;
        }else{
            bgimg2.src = web2bg[0];
            w2qh = true;
        }
},500)